﻿using Exceptionless;
using System;
using Topshelf;

namespace EventViewToExceptionless
{
    /// <summary>
    /// 备注：exceptionless的message有长度限制
    /// 但是exceptionless无长度限制，所以较长信息可放扩展字段
    /// 控制台转windows服务：https://sylvester-lee.blogspot.com/2014/06/how-to-convert-console-application-to.html
    /// </summary>
    class Program
    {
        static void Main(string[] args)
        {
            HostFactory.Run(host =>
            {
                host.SetServiceName("EventViewToExceptionless");
                host.SetDescription("this is application of EventView to Exceptionless ");
                host.StartAutomatically();
                host.Service<EventViewProcessorService>();
            });

            ExceptionlessClient.Default.Configuration.UseReferenceIds();
            //ExceptionlessClient.Default.Startup("u2tzPg5WJzXoQFLjUuxXApUaaZMppx9trympHjPd");
            ExceptionlessClient.Default.Startup();
        }
    }
}
